
 new Vue({
    el:'#mainbox',
    components: {},
      data:{
          alldata: {},
      },
      mounted () {
        var that = this;
        this.id=get('id')
        axios
          .get("http://dl.sword.ink:2334/introduce/"+this.id)
          .then((res) => {
            this.nextid = res.data.data[0].id
            that.alldata = JSON.parse(JSON.stringify(res.data.data[0]));
            console.log(that.alldata)
          });
      },
      methods: {
      },
    })
    // 获取id
    function get(par) {
                    //获取bai当前URL
                    var local_url = document.location.href;
    
                    //截取get字符串
                    var getstr = local_url.substr(local_url.indexOf('?') + 1)
    
                    //解析du成get数组
                    var get = getstr.split('&')
        
                    //查找要找的参数（zhipar）
                    for (var i in get) {
                        if (get[i].indexOf(par + '=') >= 0) {
                            return get[i].replace(par + '=', '');
                        }
                    }
                    //如果找不到返回false
                    return false;
                }
                //获取GET id值
                console.log(get('id'))
    